/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Controller;

import Modele.Contact;
import Modele.FileManipulation;
import Vue.SeeForm;
import Vue.SeeList;
import java.util.ArrayList;

/**
 *This Classe contains the main instructions of the Softawre
 * Recording a contact
 * Showing the Contact
 * Deleting a contact
 * @author Bakalian
 */
public class MenuOperation {

    /**
     * it launches the recording process
     */  
    public static void RecordContact(){
        Contact myContact=new Contact();// the new contact we'll create
        SeeForm AddContact=new SeeForm(myContact,0);// launching the graphical interface
        
    }
     
     /**
      * Lzunches the showing Process
      */
     public static void ListContact(){
         FileManipulation file=new FileManipulation();// get first the List to show
         ArrayList<Contact> contactList=file.getContact();
        
         SeeList panel=new SeeList(contactList,0);// then launche the graphical interface and gives it the List
         
     }
     /**
      * This function is about recording in the Hard drive the List given by parameters
      * Whatever the purpose is ( record or delete) the process is the same
      * we have the List of contact ( containing remove contacts or updates contacts) 
      * give it to the FileManipulation.deleteContact ( which saves it)
      * @param myContact The List of contact to save
      */
    public static void DeleteContact(ArrayList<Contact> myContact){
        FileManipulation file=new FileManipulation();
        file.DeleteContact( myContact);
      //  System.out.println("supprimer contact  numero->>>>>>>>>>"+i);
    }
     
    
    
}
